package com.njust;

import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.HandlerMapping;


import javax.servlet.ServletException;


public class InitServlet extends DispatcherServlet {

    @Override
    protected void initBeanWrapper(BeanWrapper bw) throws BeansException {
        logger.info("initBeanWrapper被调用");
        logger.info("属性名字：" + getServletContextAttributeName());
        logger.info(bw.getPropertyDescriptor("contextConfigLocation"));
        logger.info(bw.getPropertyDescriptors().length);
    }

    @Override
    protected void initFrameworkServlet() throws ServletException {
        logger.info("Spring容器初始化完毕！");
    }
}
